home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / DB_CLIPP / 2510.ZIP / TRSOURCE.EXE / SCROLLER.C < prev    next >
C/C++ Source or Header  |  1990-10-22  |  1KB  |  48 lines

  1. /*********
  2. *
  3. * SCROLLER.C
  4. *
  5. * by Leonard Zerman
  6. *
  7. * Placed in the public domain by Tom Rettig Associates, 10/22/1990.
  8. *
  9. *     SYNTAX:  SCROLLER(trow,tcol,brow,bcol,lines,direction)
  10. *              direction ::= "U"|"D"
  11. *    RETURNS:  No return value.
  12. *
  13. *    PURPOSE:  This program scrolls the screen up or down.  It expects
  14. *              6 parameters:  upper-left row, upper-left column,
  15. *              lower-right row, lower-right column, number of 
  16. *              lines to scroll, and whether to scroll up or down.
  17. *   
  18. *              If it receives any invalid parameters, it will simply
  19. *              exit without performing any action.
  20. *********/
  21.  
  22. #include "trlib.h"
  23.  
  24. TRTYPE scroller()
  25. {
  26.    double d_trow;
  27.    double d_tcol;
  28.    double d_brow;
  29.    double d_bcol;
  30.    double d_lines;
  31.    char * direction;
  32.  
  33.    if(PCOUNT == 6 && ISNUM(1) && ISNUM(2) && ISNUM(3) &&
  34.                      ISNUM(4) && ISNUM(5) && ISCHAR(6))
  35.    {
  36.       d_trow    = _parnd(1);
  37.       d_tcol    = _parnd(2);
  38.       d_brow    = _parnd(3);
  39.       d_bcol    = _parnd(4);
  40.       d_lines   = _parnd(5);
  41.       direction = _parc(6);
  42.       _tr_scroll(&d_trow, &d_tcol, &d_brow, &d_bcol, &d_lines, direction);
  43.    }
  44.   _ret();
  45. }
  46.  
  47.  
  48.